<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>{% block title %}Online Sales Project{% endblock %}</title>
        <script src="{{ asset('js/jquery-1.9.1.js') }}"></script>
        {% block stylesheets %}
        <link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}" type="text/css"/>
        {% endblock %}
    </head>
    <body>


        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container"><!-- Collapsable nav bar -->
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
 
                    <!-- Your site name for the upper left corner of the site -->
                    <a class="brand">Ventes en lignes</a>
                 
                    <!-- Start of the nav bar content -->
                    <!-- The drop down menu -->
                    <ul class="nav pull-right">
                    
                      {% if app.user %}
                      
                      <li><p><strong>{{ 'Bonjour ' ~ app.user.username ~ ' !' }}</strong></p></li>
                      <li><a href="{{path('osp_user_logout')}}">Se déconnecter</a></li>
                      
                      {% else %}
                      <li class="divider-vertical"></li>
                      <li class="dropdown">
                        <a class="dropdown-toggle" href="#" data-toggle="dropdown">Se connecter <strong class="caret"></strong></a>
                        <div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
                          <!-- Login form here -->

                          <form action="{{ path('osp_user_login_check') }}" method="post" class="form-horizontal">
                            <div class="control-group">
                                <label class="control-label" for="username">Login :</label>
                                <div class="controls">
                                    <input type="text" id="username" name="_username" value="" />
                                 </div>
                            </div>
    
                            <div class="control-group">    
                                <label class="control-label" for="password">Mot de passe :</label>
                                 <div class="controls">
                                    <input type="password" id="password" name="_password" />
                                 </div>
                            </div>    
        
                            <div class="control-group">
                                <div class="controls">
                                    <input type="submit"  class="btn" value="Connexion" />
                                 </div>
                            </div>

                           </form>
                        </div>
                      </li>
                      <li><a href="{{path('osp_home_register')}}">S'inscrire</a></li>
                      {% endif %}
                    </ul>
                </div>
            </div>
        </div>
        
       

        </br></br></br>    
        <div class="nav-collapse"><!-- Other nav bar content -->
            <div class="row">
                <div id="menu" class="span3">
                    <ul class="nav nav-pills nav-stacked">
                        <li><a href="{{path('osp_home_homepage')}}">Accueil</a></li>
                        <li><a href="{{path('osp_home_showKart')}}">Mon panier</a></li>
                        {% if app.user %}
                        <li><a href="{{path('osp_home_showOrders')}}">Mes commandes</a></li>
                        <li><a href="{{path('osp_home_mySpace')}}">Mon espace</a></li>
                        {% endif %}
                        {% if is_granted('ROLE_ADMIN') %}
                        <li class="nav-header" >Gestion du site</li>
                        <li><a href="{{path('osp_user_homepage')}}">Utilisateurs</a></li>
                        <li><a href="{{path('osp_category_homepage')}}">Catégories</a></li>
                        <li><a href="{{path('osp_product_homepage')}}">Produits</a></li>
                        <li><a href="{{path('osp_order_homepage')}}">Commandes</a></li>
                        {% endif %}
                    </ul>
                </div>

                <div id="content" class="span9">   
                {% block body %}{% endblock %}
                </div>
                            </div>
        </div>

        
            <footer class="modal-footer">
                <p style="font-size: 0.8em">Agouram | Ernewein | Heitz | Ory <strong>© 2013 - ENSIIE 1A</strong></p>
                
            </footer>

        
        {% block javascripts %}
        <script type ="text/javascript" src="{{ asset('js/bootstrap.js') }}"></script>
        {% endblock %}
    </body>
</html>
